<template>
  <div>
    <!-- <button type="button" @click="aa">注册</button> -->
    <!-- <button type="button" @click="aa">注册</button> -->
    props: {{ props }}
    <input v-model="childtitle" />
  </div>
</template>

<script setup>
import { ref, watch } from 'vue'
const childtitle = ref('abc')
const props = defineProps({
  title: {
    type: String,
    required: true
  }
})

watch(
  () => props.title,
  (newVal) => (childtitle.value = newVal),
  {
    immediate: true,
    deep: true
  }
)
</script>
